#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <iterator>
#include <functional>
#include <boost/bind.hpp>
#include <boost/timer.hpp>
#include <boost/shared_ptr.hpp>

using namespace std;

int cmp(const void * a, const void * b)
{
     return *(int*)(a)>*(int*)(b);
}

int main(int atrgc, char** argv)
{
	srand( static_cast<int>( time(0) ) );
	boost::timer Time;
	const int size = 2000000; 
	vector<int> V(size);
	generate(V.begin(),V.end(),rand);
	Time.restart();
	clock_t t = clock();
//	qsort(&*V.begin(),V.size(),sizeof(int),cmp);
//	cout<<"qsort -> "<<clock()-t<<endl;
	t = clock();
	sort(V.begin(),V.end());
	cout<<"sort  -> "<<clock()-t<<endl;
//	copy(v,v+size,ostream_iterator<int>(cout,"\n"));

	return 0;
}
